<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('vocabularys', function (Blueprint $table) {
            $table->id();
            $table->tinyInteger('type')->default(1)->comment('类型 1：AUDITION_WORD:练习听音选择 2：AUDITION_LOOK_SPELL_WORD:拼写 3：SELECT_WORD_BLANKS:练习选词填空 4：READ_AFTER:跟读');
            $table->integer('category_id')->comment('类型id');
            $table->integer('click_learn_id')->comment('内容id 当type为练习时取内容');
            $table->integer('item_id')->default(0)->comment('练习题音频id 只有type为练习时');
            $table->string('sentence')->nullable()->comment('练习题题干');
            $table->tinyInteger('on_sort')->default(0)->comment('是否开启排序 0关闭 1开启');
            $table->tinyInteger('game_type')->default(0)->comment('0 1:小火车装货物 2扎气球 3足球打气 4投篮球 5发射小火箭');
            $table->integer('sentence_id')->default(0)->comment('句子id');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('vocabularys');
    }
};
